﻿<?php get_header(); ?>
<div class="container">
    <div class="row">
        <div class="col-md-9">
            <div class="blog-post">
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                    <h1><?php the_title(); ?></h1>
                    <p><?php the_content(); ?></p>
                <?php endwhile; endif; ?>
            </div>
            <?php
            if ( is_user_logged_in() ) {
                echo "<a href='http://ttcn.me/wp-admin/admin.php?page=Dang_bai&pid=";
                echo the_ID()."&action=edit' class=' btn btn-default'>Sửa bài</a>";


                echo "<a href='http://ttcn.me/wp-admin/admin.php?page=Quan_ly_bai_viet&pid=";
                echo the_ID()."&action=xoa' class='btn btn-default'>Xóa bài</a>";
            }
            ?>
        </div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>